package com.sdhs.costcontrol.service.impl;

import java.util.List;
import com.sdhs.common.utils.SecurityUtils;
import com.sdhs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sdhs.costcontrol.mapper.GcControlChangeManageListMapper;
import com.sdhs.costcontrol.domain.GcControlChangeManageList;
import com.sdhs.costcontrol.service.IGcControlChangeManageListService;

/**
 * 变更清单管理Service业务层处理
 *
 * @author andong
 * @date 2025-03-29
 */
@Service
public class GcControlChangeManageListServiceImpl implements IGcControlChangeManageListService
{
    @Autowired
    private GcControlChangeManageListMapper gcControlChangeManageListMapper;

    /**
     * 查询变更清单管理
     *
     * @param id 变更清单管理主键
     * @return 变更清单管理
     */
    @Override
    public GcControlChangeManageList selectGcControlChangeManageListById(Long id)
    {
        return gcControlChangeManageListMapper.selectGcControlChangeManageListById(id);
    }

    /**
     * 查询变更清单管理列表
     *
     * @param gcControlChangeManageList 变更清单管理
     * @return 变更清单管理
     */
    @Override
    public List<GcControlChangeManageList> selectGcControlChangeManageListList(GcControlChangeManageList gcControlChangeManageList)
    {
        return gcControlChangeManageListMapper.selectGcControlChangeManageListList(gcControlChangeManageList);
    }

    /**
     *根据项目id查询变更清单管理
     *
     * @param id 变更清单管理
     * @return 变更清单管理
     */
    @Override
    public List<GcControlChangeManageList> selectGcControlChangeManageByIdList(Long id)
    {
        return gcControlChangeManageListMapper.selectGcControlChangeManageByIdList(id);
    }

    /**
     * 新增变更清单管理
     *
     * @param gcControlChangeManageList 变更清单管理
     * @return 结果
     */
    @Override
    public int insertGcControlChangeManageList(GcControlChangeManageList gcControlChangeManageList)
    {
		gcControlChangeManageList.setCreater(SecurityUtils.getUsername());
        gcControlChangeManageList.setCreateTime(DateUtils.getNowDate());
        return gcControlChangeManageListMapper.insertGcControlChangeManageList(gcControlChangeManageList);
    }

    /**
     * 修改变更清单管理
     *
     * @param gcControlChangeManageList 变更清单管理
     * @return 结果
     */
    @Override
    public int updateGcControlChangeManageList(GcControlChangeManageList gcControlChangeManageList)
    {
		gcControlChangeManageList.setUpdater(SecurityUtils.getUsername());
        gcControlChangeManageList.setUpdateTime(DateUtils.getNowDate());
        return gcControlChangeManageListMapper.updateGcControlChangeManageList(gcControlChangeManageList);
    }

    /**
     * 批量删除变更清单管理
     *
     * @param ids 需要删除的变更清单管理主键
     * @return 结果
     */
    @Override
    public int deleteGcControlChangeManageListByIds(Long[] ids)
    {
        return gcControlChangeManageListMapper.deleteGcControlChangeManageListByIds(ids);
    }

    /**
     * 删除变更清单管理信息
     *
     * @param id 变更清单管理主键
     * @return 结果
     */
    @Override
    public int deleteGcControlChangeManageListById(Long id)
    {
        return gcControlChangeManageListMapper.deleteGcControlChangeManageListById(id);
    }
}
